import Vue from 'vue'
import VueRouter from 'vue-router'

import Home from '../views/home'
import Classify from '../views/classify'
import ShoppingCar from '../views/shopping-car'
import Mine from '../views/mine'
import Details from '../views/shopdetails'
import ListDetails from '../views/listdetails'
import searchShop from '../views/searchShop'
import Pt from '../components/detailsPintuan'
import GoodsComment from '../components/goodsComment'
import  Msg from '../views/msg'
import Group from '../views/group'
import Login from '../views/login'

import Address from '../views/address'
import AddAddress from '../views/add-address'
import Payment from '../views/payment'
import Order from '../views/order'
import GoodsSort from '../views/GoodsSort'
import Setting from '../views/setting'
import { orderBy } from 'lodash'
Vue.use(VueRouter)
const routes = [
    {
        path: '/',
        redirect: '/home'
    },
    {
        path: '/home',
        component: Home,
    },
    {
        path: '/home/hot',
        component: Home,
    },
    // {
    //     path: '/shopdetails/:id',
    //     component: Details,
    // },
    {
        path:'/searchShop',
        component:searchShop
    },
    {
        path:'/group',
        component:Group
    },
    {
        path:'/mine/login',
        component:Login
    },
    {
        path: '/home/hot/111',
        component: ListDetails
    },
    {
        path: '/home/hot/pt',
        component: Pt
    },
    {
        path: '/home/hot/comment',
        component: GoodsComment
    },
    {
        path: '/home/:id',
        component: Home,
    },
    {
        path:'/msg',
        params:{
            key:''
        },
        component:Msg
    },
    {
        path: '/classify',
        component: Classify,
    },
    {
        path: '/shopping-car',
        component: ShoppingCar
    },
    {
        path: '/mine',
        component: Mine
    },
    {
        path:'/GoodsSort/:cataId/:sortId',
        component: GoodsSort,
        name:'goodsort',
        params:{
            cataId:'',
            sortId:''
        }


        // props:{
        // 看一看
        // }
    },
    {
        path:'/order/:type',
        component : Order,

    },{
        path: '/setting',
        component: Setting
    },{
        path: '/address',
        component: Address
    },{
        path: '/add-address',
        component: AddAddress
    },{
        path: '/payment',
        component: Payment
    }
//     children:[{
//         path:'GoodsSort/:cataId',
//         component: GoodsSort,
//         name:'goodsort',
//     },
// ]
]

const router = new VueRouter({
    routes,
    mode: 'hash'
  })
  
  export default router

